<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/10/17 0017
  Time: 上午 10:42
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>编辑</title>
    <link rel="stylesheet" href="/static/js/plugins/layui/css/layui.css">
    <link rel="stylesheet" href="/static/css/common.css">
    <link href="/static/js/plugins/bootstrap-3.3.7-dist/css/bootstrap.css" rel="stylesheet"/>
    <link href="/static/js/plugins/bootstrap-table/bootstrap-table.css" rel="stylesheet"/>
</head>
<body>
<div class="box-border">
    <div class="box-border">
            <span class="layui-breadcrumb">
                 <a href="/index" target="_top">首页</a>
                 <a href="/vote/list">投票管理</a>
                 <a><cite> 编辑</cite></a>
            </span>
        </div>
    <div class="layui-tab layui-tab-card" lay-filter="vote_tab">
        <ul class="layui-tab-title">
            <li lay-id="1" class="layui-this">活动创建</li>
            <li lay-id="2">投票项</li>
        </ul>
        <div class="layui-tab-content" >
                <div class="layui-tab-item layui-show">
                    <form action="/vote/update" method="post"class="layui-form">
                    <div class="layui-form-item">
                        <label class="layui-form-label">标题</label>
                        <div class="layui-input-block">
                            <input type="hidden" name="tabId" id="tabId"value="${param.tabId}">
                            <input type="hidden" name="voteId"value="${vote.id}" id="voteId">
                            <input type="hidden" name="id"value="${vote.id}" id="id">
                            <input type="text" name="title" value="${vote.title}" lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">banner</label>
                        <div class="layui-input-block">
                            <div class="layui-upload">
                                <button type="button" class="layui-btn" id="butt">上传图片</button>
                                <input type="hidden" name="banner" id="banner" value="${vote.banner}">
                                <div class="layui-upload-list">
                                    <img class="layui-upload-img" style="width: 100px;height: 100px" src="/downimg?path=${vote.banner}"  id="img1">
                                    <p id="msg"></p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">状态</label>
                        <div class="layui-input-block">
                            <input type="checkbox" name="status" value="1" <c:if test="${vote.status eq 1}">checked</c:if> title="发布">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">活动时间</label>
                        <div class="layui-input-block">
                            <input type="hidden" name="beginTime" id="beginTime" value="${vote.beginTime}" >
                            <input type="hidden" name="endTime" id="endTime" value="${vote.endTime}" >
                            <input type="text" name="Time" lay-verify="required" value="${vote.beginTime}~${vote.endTime}"  placeholder="请输入起止时间" autocomplete="off" class="layui-input" id="time">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn" lay-submit lay-filter="formSubmit">保存</button>
                            <a href="/vote/list">
                                <button type="button" class="layui-btn layui-btn-primary">取消</button>
                            </a>
                        </div>
                    </div>
                </form>
                </div>
                <div class="layui-tab-item">
                    <div id="toolbar" class="btn-group">
                        <button id="btn_add" type="button" class="btn btn-default">
                            <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>添加
                        </button>
                        <button id="btn_edit" type="button" class="btn btn-default">
                            <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>编辑
                        </button>
                        <button id="btn_delete" type="button" class="btn btn-default">
                            <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>删除
                        </button>
                    </div>
                    <table id="tb_page"></table>
                </div>
            </div>
    </div>
</div>

<script src="/static/js/plugins/jquery.js"></script>
<script src="/static/js/plugins/layui/layui.js"></script>
<script src="/static/js/plugins/bootstrap-3.3.7-dist/js/bootstrap.js"></script>
<script src="/static/js/plugins/bootstrap-table/bootstrap-table.js"></script>
<script src="/static/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.js"></script>
<script src="/static/js/vote/edit.js"></script>
</body>
</html>
